package crp.core.workflow.domain.services;

import crp.core.workflow.domain.models.WorkflowDefinitionNode;
import crp.core.workflow.domain.models.WorkflowInstanceEntity;
import crp.core.workflow.domain.models.WorkflowModelEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;

@Getter
@Builder
@AllArgsConstructor
public class WorkflowCandidateLoadContext {
    private final WorkflowInstanceEntity instance;
    private final WorkflowDefinitionNode node;

    public WorkflowModelEntity getModel() {
        return instance.getModel();
    }

    public String getTopic() {
        return getModel().getTopic();
    }

    public String getCandidate() {
        return getNode().getCandidate();
    }
}
